﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BoriPeter.FitnessJournal8.DAL
{
    public static class RDIConverter
    {
        public static decimal RDI2Unit(int _dailyRDI, decimal _RDI)
        {
            return (_RDI * _dailyRDI) / 100;
        }

        public static decimal Unit2RDI(int _dailyRDI, decimal _unit)
        {
            return (decimal.Truncate((_unit / _dailyRDI) * 10000))/100;
        }

        /* RDI, according to the following WIKI page: http://en.wikipedia.org/wiki/Reference_Daily_Intake */
        public const int RDI_VITAMIN_A_UG = 900;
        public const int RDI_VITAMIN_C_MG = 60;
        public const int RDI_CALCIUM_MG = 100;
        public const int RDI_IRON_MG = 18;

        public const int RDI_CALORIES_KCAL = 2000;

        public const int RDI_TOTAL_FAT_GRAM = 65;

        public const int RDI_CHOLESTEROL_MG = 300;
        public const int RDI_SODIUM_MG = 2400;
        public const int RDI_POTASSIUM_MG = 4700;

        public const int RDI_FIBER_GRAM = 25;

        public const int RDI_CARBOHYDRATE_GRAM = 300;
        public const int RDI_PROTEIN_GRAM = 50;
    }
}
